Cleanup code and add hw2