Minor cleanups and refactors as part of the Helios project.

Corresponding config PR: https://github.com/Wikia/config/pull/761