Bug fixes, cleanup, header support.