Feature/179 use wordpress core ajax functions

Implemented the ajax scripts the WordPress way. See #179 for more details.