Factorized makefile info
Refactored Makefile and added self-checking step