Small fixes and added conf settings for db