Many many fixes, mostly for interrupts
Fix compile bugs.
More fixes.
Merge pull request #5 from Alegend45/master

Merge interrupt changes