simplified Reem#write()

Instead of having separate write functions, now there is only one and
preconditions are set on certain items. It is somehow faster as well.