Updating library to Arduino 1.0

Also reorganizing file structure.