works with Arduino 1.0

You might be interested in some of these changes.