diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java
index 61786d3..eae4c46 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/APIFramework.java
@@ -555,9 +555,8 @@
             DisplayFormat pdf) throws Exception {
         for (int i = 0; i < specs.length; i++) {
             specs[i].setMaxReattempts(0);
-            JobId jobId = hcc.createJob(GlobalConfig.HYRACKS_APP_NAME, specs[i]);
+            JobId jobId = hcc.startJob(GlobalConfig.HYRACKS_APP_NAME, specs[i]);
             long startTime = System.currentTimeMillis();
-            hcc.start(jobId);
             hcc.waitForCompletion(jobId);
             long endTime = System.currentTimeMillis();
             double duration = (endTime - startTime) / 1000.00;
@@ -570,10 +569,9 @@
             throws Exception {
         for (int i = 0; i < jobs.length; i++) {
             jobs[i].getJobSpec().setMaxReattempts(0);
-            JobId jobId = hcc.createJob(GlobalConfig.HYRACKS_APP_NAME, jobs[i].getJobSpec());
             long startTime = System.currentTimeMillis();
             try {
-                hcc.start(jobId);
+                JobId jobId = hcc.startJob(GlobalConfig.HYRACKS_APP_NAME, jobs[i].getJobSpec());
                 if (jobs[i].getSubmissionMode() == SubmissionMode.ASYNCHRONOUS) {
                     continue;
                 }
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java
index 5f4c189..83e9991 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixHyracksIntegrationUtil.java
@@ -84,9 +84,8 @@
     }
 
     public static void runJob(JobSpecification spec) throws Exception {
-        JobId jobId = hcc.createJob(GlobalConfig.HYRACKS_APP_NAME, spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
         GlobalConfig.ASTERIX_LOGGER.info(spec.toJSON().toString());
-        hcc.start(jobId);
+        JobId jobId = hcc.startJob(GlobalConfig.HYRACKS_APP_NAME, spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
         GlobalConfig.ASTERIX_LOGGER.info(jobId.toString());
         hcc.waitForCompletion(jobId);
     }
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/DdlTranslator.java b/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/DdlTranslator.java
index 5e891c8..864e34a 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/DdlTranslator.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/DdlTranslator.java
@@ -133,20 +133,20 @@
                     compiledDeclarations.connectToDataverse(dataverseName);
                     break;
                 }
-                
+
                 case CREATE_DATAVERSE: {
                     checkForDataverseConnection(false);
                     CreateDataverseStatement stmtCreateDataverse = (CreateDataverseStatement) stmt;
                     String dvName = stmtCreateDataverse.getDataverseName().getValue();
                     Dataverse dv = MetadataManager.INSTANCE.getDataverse(mdTxnCtx, dvName);
                     if (dv != null && !stmtCreateDataverse.getIfNotExists()) {
-                            throw new AlgebricksException("A dataverse with this name " + dvName + " already exists.");
+                        throw new AlgebricksException("A dataverse with this name " + dvName + " already exists.");
                     }
                     MetadataManager.INSTANCE.addDataverse(mdTxnCtx,
-                    		new Dataverse(dvName, stmtCreateDataverse.getFormat()));
+                            new Dataverse(dvName, stmtCreateDataverse.getFormat()));
                     break;
                 }
-                
+
                 case DATASET_DECL: {
                     checkForDataverseConnection(true);
                     DatasetDecl dd = (DatasetDecl) stmt;
@@ -158,7 +158,7 @@
                             datasetName);
                     if (ds != null) {
                         if (dd.getIfNotExists()) {
-                            continue;                            
+                            continue;
                         } else {
                             throw new AlgebricksException("A dataset with this name " + datasetName
                                     + " already exists.");
@@ -213,9 +213,8 @@
                             break;
                         }
                     }
-                    MetadataManager.INSTANCE.addDataset(mdTxnCtx,
-                            new Dataset(compiledDeclarations.getDataverseName(), datasetName, itemTypeName,
-                                    datasetDetails, dsType));
+                    MetadataManager.INSTANCE.addDataset(mdTxnCtx, new Dataset(compiledDeclarations.getDataverseName(),
+                            datasetName, itemTypeName, datasetDetails, dsType));
                     if (dd.getDatasetType() == DatasetType.INTERNAL || dd.getDatasetType() == DatasetType.FEED) {
                         runCreateDatasetJob(hcc, datasetName);
                     }
@@ -245,7 +244,7 @@
                                 datasetName, indexName, stmtCreateIndex.getIndexType(),
                                 stmtCreateIndex.getFieldExprs(), false));
                         runCreateIndexJob(hcc, stmtCreateIndex);
-                    }                            
+                    }
                     break;
                 }
                 case TYPE_DECL: {
@@ -256,8 +255,7 @@
                             compiledDeclarations.getDataverseName(), typeName);
                     if (dt != null) {
                         if (!stmtCreateType.getIfNotExists())
-                            throw new AlgebricksException("A datatype with this name " + typeName
-                                    + " already exists.");
+                            throw new AlgebricksException("A datatype with this name " + typeName + " already exists.");
                     } else {
                         if (builtinTypeMap.get(typeName) != null) {
                             throw new AlgebricksException("Cannot redefine builtin type " + typeName + ".");
@@ -403,8 +401,7 @@
                     NodeGroup ng = MetadataManager.INSTANCE.getNodegroup(mdTxnCtx, nodegroupName);
                     if (ng == null) {
                         if (!stmtDelete.getIfExists())
-                            throw new AlgebricksException("There is no nodegroup with this name " + nodegroupName
-                                    + ".");
+                            throw new AlgebricksException("There is no nodegroup with this name " + nodegroupName + ".");
                     } else
                         MetadataManager.INSTANCE.dropNodegroup(mdTxnCtx, nodegroupName);
                     break;
@@ -412,8 +409,9 @@
 
                 case CREATE_FUNCTION: {
                     CreateFunctionStatement cfs = (CreateFunctionStatement) stmt;
-                    Function function = new Function(compiledDeclarations.getDataverseName(), cfs.getFunctionIdentifier().getFunctionName(),
-                            cfs.getFunctionIdentifier().getArity(), cfs.getParamList(), cfs.getFunctionBody());
+                    Function function = new Function(compiledDeclarations.getDataverseName(), cfs
+                            .getFunctionIdentifier().getFunctionName(), cfs.getFunctionIdentifier().getArity(),
+                            cfs.getParamList(), cfs.getFunctionBody());
                     try {
                         FunctionUtils.getFunctionDecl(function);
                     } catch (Exception e) {
@@ -474,8 +472,7 @@
             DisplayFormat pdf) throws Exception {
         for (int i = 0; i < specs.length; i++) {
             specs[i].setMaxReattempts(0);
-            JobId jobId = hcc.createJob(GlobalConfig.HYRACKS_APP_NAME, specs[i]);
-            hcc.start(jobId);
+            JobId jobId = hcc.startJob(GlobalConfig.HYRACKS_APP_NAME, specs[i]);
             hcc.waitForCompletion(jobId);
         }
     }
@@ -484,7 +481,7 @@
             AlgebricksException, Exception {
         runJob(hcc, DatasetOperations.createDatasetJobSpec(datasetName, compiledDeclarations));
     }
-    
+
     private void runCreateIndexJob(IHyracksClientConnection hcc, CreateIndexStatement stmtCreateIndex) throws Exception {
         // TODO: Eventually CreateIndexStatement and CompiledCreateIndexStatement should be replaced by the corresponding metadata entity.
         // For now we must still convert to a CompiledCreateIndexStatement here.
@@ -499,7 +496,7 @@
         }
         runJob(hcc, spec);
     }
-	
+
     private void compileDatasetDropStatement(IHyracksClientConnection hcc, MetadataTransactionContext mdTxnCtx,
             String datasetName) throws Exception {
         CompiledDatasetDropStatement cds = new CompiledDatasetDropStatement(datasetName);
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestKeywordIndexJob.java b/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestKeywordIndexJob.java
index f755752..d106ddd 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestKeywordIndexJob.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestKeywordIndexJob.java
@@ -218,10 +218,9 @@
 
         TestKeywordIndexJob tij = new TestKeywordIndexJob();
         JobSpecification jobSpec = tij.createJobSpec();
-        JobId jobId = hcc.createJob("asterix", jobSpec);
 
         long start = System.currentTimeMillis();
-        hcc.start(jobId);
+        JobId jobId = hcc.startJob("asterix", jobSpec);
         hcc.waitForCompletion(jobId);
         long end = System.currentTimeMillis();
         System.err.println(start + " " + end + " " + (end - start));
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestSecondaryIndexJob.java b/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestSecondaryIndexJob.java
index 17d8c9f..4c7e46e 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestSecondaryIndexJob.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/file/TestSecondaryIndexJob.java
@@ -218,10 +218,9 @@
 
         TestSecondaryIndexJob tij = new TestSecondaryIndexJob();
         JobSpecification jobSpec = tij.createJobSpec();
-        JobId jobId = hcc.createJob("asterix", jobSpec);
 
         long start = System.currentTimeMillis();
-        hcc.start(jobId);
+        JobId jobId = hcc.startJob("asterix", jobSpec);
         hcc.waitForCompletion(jobId);
         long end = System.currentTimeMillis();
         System.err.println(start + " " + end + " " + (end - start));
