Fixed some bugs with single elements [#5]
Also changed the database tables slightly, and added more DBObject classes.