Fixed bug where interrups would remain disabled after scheduler pre-emption.
Cleaned up debugging code and added way for thread to set priority.
Changes to debugging code.