Moving helper functions and init to visualizeHelper.js