code cleanup + old unused references