nf/ref stuff

Contributions to `sc/ref_stuff branch`( PR #48 ).