Refactor mouse selection buttons handlers