fixed unfinished tests and db initialization