UserInputPanel refactoring:
* expanded test cases
Merge back changes from master