reordered code and tests
renamed core.helper.js to core.methods.js