Refactored! :)