more work on refactor, upgrade three.js, add plato