Used s.val() and s.set() internally, and improved s.set().