Added DTDs, macrofied parts of IO module