Modified compile script so it is easier to understand