Code cleanup / Integration with unit test framework