changes to the db helper functions by turning them into classes.  Now they are kept in scope, so there wont be any conflicts between files.

Also renames functions.php to html_helper.php to make it a bit more specific.