Code cleanup in the middle