did some minor refactoring.  Still need to spend some time to go through every file carefully as opposed to just skimming through them quickly