Small fixes, database script updated