Watch the button phase to fade in or fade out. Added some helper functions.