Enhancement: Separates out logic.