added tests to attribute of type ref
added note about implementation
added description
added doc. Removed superfluous function
fixed ref test