Updated comments and added a few tests whilst converting to blog posts.