Added TableRegistry class
Fix issue where empty entities were being saved
Add missing tests for saving data