some code cleanup + documentation; turning in the december 19th iteration