Changes to include

Wrapping into multiple files on a switch
Inclusion of example project
Refactoring to allow easier maintainance.

Inclusion of refactoring from simon proctor too