Theories of gravitation in the space of reference frames