Make C interfacing a bit easier. Refactor flx a bit.