Small fixes and alterations to remove node ref