Made the instance folder be automatically created by the app if it doesn't exist. Also cleaned up a couple imports to be in line with PEP 8.
Fixed bug where we weren't reusing our db connections