Refactor solution 001 slightly