Ref: command moved to userinput.cc, a few more reorganization moves.
Add: user input tests
Fix: add tests for UI and few changes