 
         spinner.innerHTML = if spinnerTemplate?
           spinnerTemplate
-        else if options.spinnerTemplate?
-          options.spinnerTemplate
+        else if @_options.spinnerTemplate?
+          @_options.spinnerTemplate
         else
           throw new Error("You need to set a spinner template ID or spinnerTemplate")
 
-        loadingCenterMiddleDiv.appendChild(logoImg)
-        loadingCenterMiddleDiv.appendChild(spinner)
-        loadingCenterMiddleDiv.appendChild(@_messageDiv)
-        loadingCenterOuterDiv.appendChild(loadingCenterMiddleDiv)
-        loadingInnerDiv.appendChild(loadingCenterOuterDiv)
-        @_loadingDiv.appendChild(loadingInnerDiv)
         document.body.appendChild(@_loadingDiv)
 
       _loadingDone: ->
         document.body.removeChild(@_loadingDiv)
         @_stylesheet.disabled = true
         document.body.className += " pg-loaded"
+
+      _setOptions: (new_opts = {}) ->
+        options = @defaultOptions
+
+        # Set options
+        for k, v of new_opts
+          if options.hasOwnProperty(k) then options[k] = v
+
+        options
     }
 
     return {

do ->
  "use strict"

  PleaseWait = ->
    getTransitionEvent = ->
      el = document.createElement('fakeelement')

            @_loadingDone()
        else @_loadingDone()

      load: (options = {}) ->
        @_options                          = @_setOptions(options)
        @_loadingDiv                       = document.createElement("header")
        @_loadingDiv.className             = "pg-loading-screen"
        @_loadingDiv.style.backgroundColor = @_options.backgroundColor
        @_loadingDiv.innerHTML             = @_options.template
        spinnerTemplate                    = null
        spinner                            = @_loadingDiv.getElementsByClassName("pg-loading-spinner")[0]
        logo                               = @_loadingDiv.getElementsByClassName("pg-loading-logo")[0]
        logo.src                           = @_options.logo

        for script in document.scripts
          if script.id == "pgLoadingSpinner"
