Refactorization, Added Makefile and some includes

Refactorization, Added Makefile and some includes.