Review changes for #810 including fix for NPE and adding new reverse lookup attributes