Refactored the button directive.