Refactor and make post page work properly.