Refactored code now isnt broken!