cleanups of the code (no functional changes)