Fix JSLint errors
Fix tests to work with new models