Changed the "ref" macro to "eref" otherwise it conflicts with something inside the STL.