Added test for and uncommented code to fit test patterns