updated hooks, renamed html script/style methods, pass errors through async callbacks, code cleanup