Updated some of the insert queries.

Getting the database inserts working, still have some modifications
left.