Rewrite of modules to use the Revealing Module Pattern