Improve compilation script