A lot of refactroings. Starting to getting rid o idioms.js