Fixed Database to remove foreign key.
Removed some code.