clean up code and make comments (arduino code)