Runtime: refactored State class a little bit