Moved interrupt handling functions to separate structures