Refactored to reduce method lengths