Tried a little refactoring... Not sure how much value it added