Changes to Database File and a few fixes