changed the arduino code small bit for readability, and comitting some old changes for think
added everything
merged changes in arduino