Minor formatting changes
Fix to use stringstream instead of sprintf
Fix bugs with operator() and implement setVal to pass test2