moved all SQL queries into single Database module

Nothing changed in this file, yes?