Gave prototypes and added interrupt code.