refactors classification into separate ns