Finished doing some cleanup and commenting