Fixes the database connection by creating the engine at init.
I'm not sure where or how this was done before.
Adjustments to comments and documentation.