Refactored code to make it less hacky. Improved colour parsing and reduced number of shared variables used.
Changed working pulse colour to orange instead of yellow.