Made a few code changes so that the Arduino should be easier to setup.
This code will not compile, but it should be close. Added a few constructs for code portability such as pin declaration table and an arduino specific source file that can be used for any functions that are application agnostic.