Tidy up a bit. Does not link dbtests properly (not sure why yet)