header cleanup and early documentation