Moved a lot of stuff to the handlebars instead of as helper functions