Initial changes for switch to three.js