Moved get/post routing and functions to routes.js