Develop js

AFAIK only minor changes, which fixes several UI bugs