Lots of cleanup :: remove some unused variables :: add comments for future reference