Fixes to Main, DB changes