Restructure files
Update Makefile
Refactor code