Moved all of the database functions out into its own file to reduce noise in the flask application
Updated index to reflect using the path instead of id
Removed a lot of functions and moved them to their own file