Copyright Notices and Optimizations

A few of the uint8_t's have been replaced with bytes - it seemed to me that their value was never to exceed 255. This change will free up some of the SRAM at runtime.

I also added copyright notices to the program, in accordance to the GPL v3.
this function needs to be unchanged as some more math or code will be here later