Added CORS filter. Tidied up the filters.php code