little clean up of source and variable renaming