Based on: http://www.sitepoint.com/series/building-web-applications-with-beego/