fixed handler generation. fixed tests. fixed html demo