Removed foreign key and redesigned messages tables