Merged refactor-api into refactor-db