Added various printf's change some variable declarations, and changed Ge...

...tTriggerState to fix build errors