Adding comments and performFeatureDetection in test.cpp