Refactored code.  Check out README for a bit of info