var declarations, minor syntax errors, some style incosistency, and no global object prototype modification