condense ret = ret | to ret |=
reordered includes
variable cleanup