mode a couple of changes and added more files responsible for working with the DB etc