Refactored solutions