slight refactor to account for new ability to use headers etc

header support, slight refactor, __date/__namespace support.