Header file cleanup and fixed ce_flags