Fixed double pop up alert message on deleting classified. Some other small fixes and refactoring