remove unused functions
remove fenv_ref
more cleanup