Refactoring Solution 13

Minor refactoring