Renamed database tables to something more sensible .. fixed some bugs making it impossible to save document