fixed weird bugs with state caused by incorrect placement of variables. if you place them in the body of the implementation, it seems to assume they are static. moved them into the interface declaration where they ought to have been from the start