MEGA changes

New db creation added etc etc etc lotrs of stuff