created new structure of code, all functions are in different files for simplicity, new Makefile