Added possibility to delete a category and removed useless code.