Restructured the differentiation between "nojs" and normal.

(And added the missing "response = Response(...)".)