Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision 85799aa04c5613c5e88e2145b1eb3105f03852c8)
+++ Jenkinsfile	(revision ec5d599d4511c74de9bc53a820dd3d90cb762abe)
@@ -30,7 +30,7 @@
 				SrcDir    = pwd tmp: false
 
-				clean()
-
-				checkout()
+				Tools.Clean()
+
+				Tools.Checkout()
 
 				build()
@@ -81,25 +81,4 @@
 // Main compilation routines
 //===========================================================================================================
-def clean() {
-	Tools.BuildStage('Cleanup', true) {
-		// clean the build by wipping the build directory
-		dir(BuildDir) {
-			deleteDir()
-		}
-	}
-}
-
-//Compilation script is done here but environnement set-up and error handling is done in main loop
-def checkout() {
-	Tools.BuildStage('Checkout', true) {
-		//checkout the source code and clean the repo
-		final scmVars = checkout scm
-		Settings.GitNewRef = scmVars.GIT_COMMIT
-		Settings.GitOldRef = scmVars.GIT_PREVIOUS_COMMIT
-
-		echo GitLogMessage()
-	}
-}
-
 def build() {
 	debug = true
@@ -236,67 +215,4 @@
 //Routine responsible of sending the email notification once the build is completed
 //===========================================================================================================
-@NonCPS
-def SplitLines(String text) {
-	def list = []
-
-	text.eachLine {
-		list += it
-	}
-
-	return list
-}
-
-def GitLogMessage() {
-	if (!Settings || !Settings.GitOldRef || !Settings.GitNewRef) return "\nERROR retrieveing git information!\n"
-
-	def oldRef = Settings.GitOldRef
-	def newRef = Settings.GitNewRef
-
-	def revText = sh(returnStdout: true, script: "git rev-list ${oldRef}..${newRef}").trim()
-	def revList = SplitLines( revText )
-
-	def gitUpdate = ""
-	revList.each { rev ->
-		def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim()
-		gitUpdate = gitUpdate + "       via  ${rev} (${type})"
-	}
-
-	def rev = oldRef
-	def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim()
-	gitUpdate = gitUpdate + "      from  ${rev} (${type})"
-
-	def gitLog    = sh(returnStdout: true, script: "git rev-list --format=short ${oldRef}...${newRef}").trim()
-
-	def gitDiff   = sh(returnStdout: true, script: "git diff --stat --color ${newRef} ${oldRef}").trim()
-	gitDiff = gitDiff.replace('[32m', '<span style="color: #00AA00;">')
-	gitDiff = gitDiff.replace('[31m', '<span style="color: #AA0000;">')
-	gitDiff = gitDiff.replace('[m', '</span>')
-
-	return """
-<pre>
-The branch ${env.BRANCH_NAME} has been updated.
-${gitUpdate}
-</pre>
-
-<p>Check console output at ${env.BUILD_URL} to view the results.</p>
-
-<p>- Status --------------------------------------------------------------</p>
-
-<p>BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result}</p>
-
-<p>- Log -----------------------------------------------------------------</p>
-
-<pre>
-${gitLog}
-</pre>
-
-<p>-----------------------------------------------------------------------</p>
-<pre>
-Summary of changes:
-${gitDiff}
-</pre>
-"""
-}
-
 //Standard build email notification
 def email(boolean log) {
@@ -310,5 +226,5 @@
 generated because of a git hooks/post-receive script following
 a ref change which was pushed to the C\u2200 repository.</p>
-""" + GitLogMessage()
+""" + Tools.GitLogMessage()
 
 	def email_to = !Settings.IsSandbox ? "cforall@lists.uwaterloo.ca" : "tdelisle@uwaterloo.ca"
@@ -475,5 +391,5 @@
 					description: 'If true, build compiler using new AST', 		\
 					name: 'NewAST', 									\
-					defaultValue: false,  								\
+					defaultValue: true,  								\
 				], 												\
 				[$class: 'BooleanParameterDefinition',  						\
