Various improvements; JS additions