Refactored the codeTransitionButton class (added a separate subclass)