Encapsulated. Added Grunt tasks. Tests pass.