Topic/refactor

I refactored your code for you.
Enjoy.  :-)