Refactored Code

nuff said