Removed use of global in Object.
Moved booleanToInt to a more sane place.