Remove unneeded usage of state