javascript: bugfix
severeal cleanups