Code clean up in legend
Move default value generation to new module. Add helper to FeatureForm for fast access