NW: Added unified makefile
NW: Fixed typo in variable id 'referrence'
NW: Added back the reference computation that was accidentally removed from the C version