Added some of the interrupt code and also the beginning of the RTC.