- Removed more system code from user code.

- Removed the functions FlagChangeFromInterrupt and StateChangeFromInterrupt()