Moved static variables (buffer lengthes...) from StateManager to Globals