Refactored ngRDFResource and wrote new tests