WIP on using less internal state and more queries