moved all SQL queries into single Database module

This looks different. Maybe just renamed?