code cleanup 1
design improvements
header fixes