Code for blogapp based on http://www.lightbird.net/dbe/blog.html