Changed the Button Pressed command to use less lines of code, by getting rid of unneccesary variable declarations