added DocumentField and readonly/writeonly options