Improved compile.py file to make compilation