Added database type system. This is a rudimentary ORM that I might extract and convert to a library at a later stage