added more commenting, cleaned up a couple files. added a bunch of #TODO marks.