Improved compile script