initial code cleanup