Reorganized the Router
added database functionality with mongoose