remove dead code around component local state