Added javascript (untested), UI works