Fixes broken deactivate method

It also includes refactoring `handlingRemoveTerm` in a more coffeescriptish way