test against extending objects instead of functions
fixed BB OS7 and jshint gotchas
fixed few typos