First implementation of AVR's scheduler. Debug needed.