Refactoring of die types via Module Pattern; refactored some feature code into Object Literals to organize code and clean up global namespace