add debug page, refactor js api, add minifie version of css and js