Cleanup and comment code.