Refactored code to be modules instead of using

an auto executing function that returns an object because it was silly.