Added saveDatabase method in the prog4 class & cleaned up some errors in prog4 class