worked on some code cleanup