All tests now pass, code clean-up