Refactor

Sorry for the mega-commit, this is a cleanup across the code-base,
trying to get the style consistent.