Simplified database. Rewrote datavase code. Added some exception handling (need more development)