Refactor button

Refactor using .on