Started some code cleanup.