Add better interrupt handling; improve in-code documentation.