type safe toBuf parameters included
toBuf added
rudimentary testing for toBuf
makefile for whole project