Categories Edit: removed debug data. Some code comments were added