remove some unused typedefs and constant, some indentation fixes
fix the headercheck

(i.e., make all headers autonomous again)