Restructured calculator as a jQuery plugin and got my single test passing