Tightened up preconditions in constructor. Added a forEach() method.