Removed redundant code from create_sparse_feature_matrix