Made some helper methods html_safe
Fixed title
Removed group clause that was screwing up pivoting
Moved "nested" methods into parent scope
Fixed implicit dependency and load paths