Update database schema
General fixes and improvements