implement Newstate and simplify some mock usage a bit