Fixed problems so that all the current (5) tests pass