refactored to not to use SqlClient where appropriate
fixed creation of new database