changed SystemMode define

moved the #DEFINE's above the #INCLUDE because changing the SystemMode
using the RMS webpage wasn't working.
cleaned up some unnused code