State manager added. Cleanest shit ever.