Made some progress on the code.