Remove code duplication: #write in Page and Post is the same.