Final round of code cleanup