debugged remote database connection and separation of data model in a separate module