Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision 992c26d6faaa518bc023f8d5761686b0ae258f40)
+++ Jenkinsfile	(revision 29f4fe62da848d80ee775aea3fd946d02bda6b5a)
@@ -1,3 +1,7 @@
 
+//===========================================================================================================
+// Main compilation routine
+//===========================================================================================================
+//Compilation script is done here but environnement set-up and error handling is done in main loop
 def build() {
 	build_stage 'Checkout'
@@ -20,6 +24,5 @@
 	build_stage 'Test'
 
-		status_prefix = 'Test'
-
+		//Run the tests from the example directory
 		dir ('src/examples') {
 			sh './runTests.sh'
@@ -28,7 +31,12 @@
 	build_stage 'Cleanup'
 
-		//install doesn't need to be cleaned since prefix uses temporary workspace
+		//Cleanup the install dir
+		sh "rm -rf ${install_dir}/*"
 }
 
+//===========================================================================================================
+// Helper classes/variables/routines to make the status and stage name easier to use
+//===========================================================================================================
+//Description of a compiler
 class CC_Desc {
 	String name
@@ -37,6 +45,9 @@
 }
 
+//Global Variables defining the compiler and at which point in the build we are
 def currentCC
+def status_prefix
 
+//Wrapper to sync stage name and status name
 def build_stage(String name) {
 	def stage_name = "${currentCC.name} ${name}".trim()
@@ -46,20 +57,39 @@
 }
 
+//===========================================================================================================
+// Main loop of the compilation
+//===========================================================================================================
 node ('master'){
 
 	def err = null
-	def status_prefix
 	def log_needed = false
 	currentBuild.result = "SUCCESS"
 
 	try {
-		currentCC = ['gcc-4.9', 'g++-4.9', 'gcc-4.9'] as CC_Desc
-		build()
+		//Prevent the build from exceeding 30 minutes
+		timeout(30) {
+
+			//Wrap build to add timestamp to command line
+			wrap([$class: 'TimestamperBuildWrapper']) {
+
+				//Compile using gcc-4.9
+				currentCC = ['gcc-4.9', 'g++-4.9', 'gcc-4.9'] as CC_Desc
+				build()
+
+			}
+		}
 
 	}
 
+	//If an exception is caught we need to change the status and remember to
+	//attach the build log to the email
 	catch (Exception caughtError) {
+		//rethrow error later
 		err = caughtError
+
+		//An error has occured, the build log is relevent
 		log_needed = true
+
+		//Store the result of the build log
 		currentBuild.result = "${status_prefix} FAILURE".trim()
 	}
@@ -76,4 +106,7 @@
 }
 
+//===========================================================================================================
+//Routine responsible of sending the email notification once the build is completed
+//===========================================================================================================
 def email(String status, boolean log) {
 	//Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
