First communication with database.
Refactor code into separate files.