Add function to put away a connection.
Add a database decorator to be used instead of global DB.