cleanups
Reduce number of allocation due to wait_chan and wait_compl
FreeBSD build fixes