remove trailing comma; fix var typo; add jshint header
added isDirty for file field implementation