--- a/AutoPano.c
+++ b/AutoPano.c
@@ -22,6 +22,8 @@
 
 void Usage ()
 {
+    WriteLine ("Autopano: Match Keypoints generated by generatekeys\n");
+    WriteLine ("  Version %s\n", PACKAGE_VERSION);
 	WriteLine ("usage: autopano.exe [options] output.pto keys1.xml keys2.xml [..]\n");
 	WriteLine ("Options");
 	WriteLine ("  --ransac <on|off|1|0>   Switch RANSAC filtration on or off (default: on)");
@@ -132,7 +134,7 @@
 	int doneRefines = 0;
 	int i;
 	for(i=0; i<ArrayList_Count(msList); i++) {
-		MatchSet* ms = ArrayList_GetItem(msList, i);
+		MatchSet* ms = (MatchSet*) ArrayList_GetItem(msList, i);
 		int j;
 		for(j=0; j<ArrayList_Count(ms->matches); j++) {
 			ArrayList_GetItem(ms->matches, j);
@@ -142,7 +144,7 @@
 
  
 	for(i=0; i<ArrayList_Count(msList); i++) {
-		MatchSet* ms = ArrayList_GetItem(msList, i);
+		MatchSet* ms = (MatchSet*) ArrayList_GetItem(msList, i);
 		WriteLine ("  between \"%s\" and \"%s\"",
 			   ms->file1, ms->file2);
 		
@@ -161,7 +163,7 @@
 
 		int j;
 		for(j=0; j<ArrayList_Count(ms->matches); j++) {
-			Match* m = ArrayList_GetItem(ms->matches, j);
+			Match* m = (Match*) ArrayList_GetItem(ms->matches, j);
 
 			int p1x = (int) (m->kp1->x + 0.5);
 			int p1y = (int) (m->kp1->y + 0.5);
@@ -224,7 +226,7 @@
 				continue;
 			}
 
-			MatchSet* pSet = ArrayList_GetItem(matches, 0);
+			MatchSet* pSet = (MatchSet*) ArrayList_GetItem(matches, 0);
 
 			// Now get the real new control point coordinates from the
 			// patches.  We have two options and assume all points are
@@ -241,7 +243,7 @@
 
 			int k;
 			for(k=0; k<ArrayList_Count(pSet->matches); k++) {
-				Match* pM = ArrayList_GetItem(pSet->matches, k);
+				Match* pM = (Match*) ArrayList_GetItem(pSet->matches, k);
 				if (selectMiddlePoint) {
 					double dist = sqrt (
 						pow (pM->kp1->x - p1radius, 2.0) +
@@ -381,7 +383,7 @@
 	ArrayList* resolutions = ArrayList_new0 (Resolution_delete);
 	int i;
 	for(i=0; i<ArrayList_Count(mm->keySets); i++) {
-		KeypointXMLList* kx = ArrayList_GetItem(mm->keySets, i);
+		KeypointXMLList* kx = (KeypointXMLList*) ArrayList_GetItem(mm->keySets, i);
 		HashTable_AddItem(imageNameTab, kx->imageFile, (void*)imageIndex);
 		ArrayList_AddItem(resolutions, Resolution_new (kx->xDim, kx->yDim));
 		
@@ -393,14 +395,14 @@
 		
 		int refIdx;
 		for (refIdx = 0 ; refIdx < (ArrayList_Count(resolutions) - 1) ; ++refIdx) {
-			if (Resolution_CompareTo(ArrayList_GetItem(resolutions, refIdx), kx->xDim, kx->yDim) == 0)
+			if (Resolution_CompareTo((Resolution*) ArrayList_GetItem(resolutions, refIdx), kx->xDim, kx->yDim) == 0)
 				break;
 		}
 		if (refIdx == (ArrayList_Count(resolutions) - 1))
 			refIdx = -1;
 		
 		Position* pos = bb == NULL ? NULL :
-			HashTable_GetItem(bb->positions, imageFile);
+			(Position*) HashTable_GetItem(bb->positions, imageFile);
 		/*
 		  if (pos != NULL) {
 		  WriteLine ("yaw %g, pitch %g, rotation %g",
@@ -429,10 +431,10 @@
 	fprintf(pto, "# match list automatically generated\n");
 	int j;
 	for(j=0; j<ArrayList_Count(msList); j++) {
-		MatchSet* ms = ArrayList_GetItem(msList, j);
+		MatchSet* ms = (MatchSet*) ArrayList_GetItem(msList, j);
 		int k;
 		for(k=0; k<ArrayList_Count(ms->matches); k++) {
-			Match* m = ArrayList_GetItem(ms->matches, k);
+			Match* m = (Match*) ArrayList_GetItem(ms->matches, k);
 			if (integerCoordinates == false) {
 				fprintf(pto, "c n%d N%d x%.6f y%.6f X%.6f Y%.6f t0\n",
 					(int)HashTable_GetItem(imageNameTab, ms->file1), (int)HashTable_GetItem(imageNameTab, ms->file2),
@@ -653,7 +655,7 @@
 	int compN = 1;
 	int j;
 	for(j=0; j<ArrayList_Count(components); j++) {
-		Component* comp = ArrayList_GetItem(components, j);
+		Component* comp = (Component*) ArrayList_GetItem(components, j);
                 char* compstr = Component_ToString(comp);
                 WriteLine ("component %d: %s", compN++, compstr);
                 free(compstr);