additional refactor of code, Makefile updated with version