Add class for References

Also remove hardcoding of /httpAuth/app/rest/ as this causes problems
when following references. This all needs to be cleaned up...