did some code cleanup