remove unneeded isDefined function and fix up model protoype for JSLint