Cleanup / re-org code into single class