some cleanup; modified extractFeatures

extractFeatures:
-input takes only X not [X,Y]
-added rows with ones