Refactorings to reduce method complexity