Added functionality for updating posts. Will test later.