cas.h code cleanup