Adds ability to add categories via ajax, fixes some bugs related to category permalinks