code cleanup, remove unused references