Updated module test spec & refactored core.js