Web interface. Changed js func structure. #12