Simplified/refactored long method.