A few code cleanups, optimise imports & typo corrections before refactoring