diff --git a/Language/Elm/Yesod.hs b/Language/Elm/Yesod.hs
--- a/Language/Elm/Yesod.hs
+++ b/Language/Elm/Yesod.hs
@@ -27,9 +27,8 @@
 import Text.Blaze (preEscapedToMarkup)
 import Text.Julius
 import Yesod.Core (Route (..), Yesod(..), ScriptLoadPosition(..))
-import Yesod.Handler (getUrlRenderParams, GHandler (..))
+import Yesod.Handler
 import Yesod.Widget
-import Yesod.Handler (lift, getYesod)
 import Language.Elm
 import Language.Elm.Quasi
 
@@ -66,12 +65,11 @@
   let (html, css, js) = toParts (urlFn, source)
       initscript = [julius| Dispatcher.initialize(); |]
   in do toWidgetHead css
-        toWidget [julius| #{js} |]
+        toWidgetBody [julius| #{rawJS js} |]  -- insert in body so elm can find document.body  (see issue#5)
         toWidget html
         case jsl of
           BottomOfBody -> toWidget initscript  -- insert as last script
           otherwise -> toWidgetBody initscript -- insert in body instead of head
-
 
 -- | Return type of template-reading functions.
 type ElmUrl url = (url -> [(TS.Text, TS.Text)] -> TS.Text) -> Elm
diff --git a/elm-yesod.cabal b/elm-yesod.cabal
--- a/elm-yesod.cabal
+++ b/elm-yesod.cabal
@@ -1,5 +1,5 @@
 Name:                elm-yesod
-Version:             0.1.3
+Version:             0.2
 Synopsis:            The Elm language Yesod compatibility module.
 Description:         This module provides a simple function to embed Elm code
                      as a Yesod widget.
@@ -10,8 +10,8 @@
 License-file:        LICENSE
 
 Author:              Vincent Ambo
-Maintainer:          geva@humac.com
-Copyright:           Copyright: (c) 2011-2012 Vincent Ambo
+Maintainer:          tazjin@gmail.com
+Copyright:           Copyright: (c) 2011-2013 Vincent Ambo
 
 Category:            Web, Yesod
 
@@ -28,7 +28,7 @@
   exposed-modules:     Language.Elm.Yesod
   Build-depends:       base >=4.2 && <5,
                        blaze-markup == 0.5.*,
-                       Elm >= 0.1.2.1,
-                       yesod-core >= 1,
+                       Elm >= 0.7,
+                       yesod-core >= 1.1,
                        shakespeare-js,
                        text
