Reorganized and added initial GetFeatures code