Modified timer0 to CTC mode. Minor fixes.