Reformatted code and added FeatureGen class
Fixed merge conflicts