code cleanup. stopped poluting rootscope