finished refactoring a bunch of cut & paste code related to setting input field limits