Refactor the main module generating code.
Refactor the main module generating code.

pairyo/elm-compiler,laszlopandy/elm-compiler,Axure/elm-compiler,deadfoxygrandpa/Elm,JoeyEremondi/elm-pattern-effects,mgold/Elm,5outh/Elm