Small refactorings in the main package class.