ongoing refactoring (work in progress, use go.js for now)