Remove mpl::bool_ dependency from ref.hpp, clean up a bit.