Minor code refactors.