Added create and update posts functionality.