Move post creation into method.