Cleaned up avr implementation.
Cleaned up avr implementation.