Automated saving + bugfixes

Started database version 1