wraps javascript variables in object, adjusts jasmine tests accordingly