Database files added and bugs fixed