Minor refactoring of create-posts and create-post