Using wp_send_json
Better enqueueing of scripts
Removing console.log

Signed-off-by: Zane <zane@zanematthew.com>
Improved error codes

Signed-off-by: Zane <zane@zanematthew.com>