improving on the implementation of JRef terms