Added slugify to the ajax interface and cleaned up a little bit