codebase cleanup

see commit notes.