Functional version including new makefile and debug version.