changed the db queries to be made through the class which encapsulates them. changed the js to be loaded locally instead of remote.