@anlu please take a close look at this class, this state space is kinda hairy and I'd love some feedback