Cleaning up code abstraction

Keeping code clean and clear is important for several reasons. Firstly, it makes it easier for others to understand your code and this enhances collaboration. Secondly, it makes it easier for yourself to understand / read and skim your own code. Thirdly, it ensures that you are constantly reviewing the code. In some instances, clean code can result in smaller compiled binaries and this is a benefit when working with the limited memory available on microprocessors.

As a start, follow the following guide:

https://www.arduino.cc/en/Reference/StyleGuide

(More best-practice coding recommendations to come)