Add some more helpers and make it work with rails.