Formal code review

Some formal code quality checks
- mainly alias removal
- cleanup of namespace change artifacts

Indentation uses spaces, should be tabs.