diff --git a/Rakefile b/Rakefile
index 023dabe8..a90c47aa 100644
--- a/Rakefile
+++ b/Rakefile
@@ -3,7 +3,6 @@ require 'rake/testtask'
require 'rake/rdoctask'
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
-
desc 'Default: run unit tests.'
task :default => :test
diff --git a/init.rb b/init.rb
index 9e43d00e..f7119e55 100644
--- a/init.rb
+++ b/init.rb
@@ -1,4 +1,4 @@
require 'haml/engine'
require 'haml/helpers'
-ActionView::Base.register_template_handler("haml", HAML::Engine)
\ No newline at end of file
+ActionView::Base.register_template_handler('haml', Haml::Engine)
\ No newline at end of file
diff --git a/lib/haml/engine.rb b/lib/haml/engine.rb
index d689a644..4da2bf4d 100644
--- a/lib/haml/engine.rb
+++ b/lib/haml/engine.rb
@@ -1,42 +1,52 @@
require File.dirname(__FILE__) + '/helpers'
-module HAML
-
+module Haml
class Engine
- attr_accessor :base
-
- include HAMLHelpers
-
- def initialize(base)
- @base = base
- @happy_land = HappyLand.new(@base, @base.assigns)
+ include Haml::Helpers
+
+ # Set the maximum length for a line to be considered a one-liner
+ # Lines <= the maximum will be rendered on one line, i.e. +
+
This is a title!
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit
+
+
+
Cigarettes!
+
Man alive!
+
+ - Slippers
+ - Shoes
+ - Bathrobe
+ - Coffee
+
+
+ This is some text that's in a pre block!
+ Let's see what happens when it's rendered! What about now, since we're on a new line?
+
+
+
+
diff --git a/test/templates/helpers.haml b/test/templates/helpers.haml
index 55009fd2..6fe0f15e 100644
--- a/test/templates/helpers.haml
+++ b/test/templates/helpers.haml
@@ -1,2 +1,2 @@
= h("&&&&&&&&&&&") #this is an ActionView Helper... should load
-= flatten("Hello\nnextline") #a haml helper
+= ("Hello\nnextline") #a haml helper
diff --git a/test/templates/original_engine.haml b/test/templates/original_engine.haml
new file mode 100644
index 00000000..17b2e4cd
--- /dev/null
+++ b/test/templates/original_engine.haml
@@ -0,0 +1,26 @@
+!!!
+ %html
+ %head
+ %title Stop. HAML time
+ #content
+ %h1 This is a title!
+ %p Lorem ipsum dolor sit amet, consectetur adipisicing elit
+
+ %ul
+ %li one
+ %li two
+ %li three
+
+ %p{ :class => 'foo', :style => 'color:green' } Cigarettes!
+
+ %h2 Man alive
+
+ %ul.things
+ %li Slippers
+ %li Shoes
+ %li Bathrobe
+ %li Coffee
+
+ %pre
+ This is some text that's in a pre block!
+ Let's see what happens when it's rendered! What about now, since we're on a new line?