changed file structure to restful routing and updated main app file