fixed issues with ajax mod_rewrite plus several other tweaks