getting rid of a lot of mutable state in LL