Adds NewPost() factory function