remove unnecessary instance vars, refactor