Changed up some minor errors so code compiles

Added some forward declerations, defines and some more stuff from Neil's
code. Added error code file to blink LEDs in nice patterns to show error
codes.