Code layout refactor. Add StartState