Custom states and state manager