Enhanced database class, added many new methods.