Refactor UI

Moved the editing of values options into ui/advanced().
Refactored those options to reduce duplicate code.