beginning to reorganize app

moving functions to routes folder for better readability as the app
grows