Database fully implemented to save time.
Merge conflicts fixed.