Compiles under Spark firmware V0.2.1

Needs real world testing and clean up of comments and code indentation
Corrected syntax

Compiles under Spark firmware V0.2.1
Needs real world testing and clean up of comments and code indentation