Try to play nice with AMD and node.js.
Fixed windows offset defaults and added debug functionality.