added pure json return support, no more html stuff