fixing some compiler errors in CCS

intermingled declarations and code is not suported in CCS