Add coverage support, simplify test for checking ajax handling