reorganize methods before refactoring
refactoring and starting integration tests for routes and json