Refactored everything, fixed some JSON Escaping bugs