Code is bad. Delete some.

Better db handling, got rid of a "You're leaking connections" error.
Some more print statements.