Total rewrite of the Arduino App needed!

Error messages and line numbers are one out due to the editor starting at line 1 and the compiler at line 0.
When you get an error the appropriate line is almost always highlighted, mind you that is not always where the error is it is just where the compilers ally gave up.