Some more work on the code code cleanup