Added logging functionality to database.
Added stub functions that i know need to be implemented.