More reorganization of the code + makefile