Improve compile script