Better use of dicts

I was using a try-catch block to test for keys. That was silly.

I also had to change a method to check for certain keys before attempting to insert info to the DB.