Improve handling user actions.

Remove debug prints.