Write a base class for lights output, first step for hw abstraction.
Also some cleanup