simplify
strip out unused pragmas
export an API, get rid of warnings