Some minor refactorings within the main package class.