A template largely based on: http://buffered.io/posts/webmachine-erlydtl-and-riak-part-1/