Some code layout optmization
Base implementation of DB log entries