Improved tests, added loopObject to helpers.js