Refactored editable category login into single function.
Added ability to edit categories