Minor bug fixes! Various JS improvements!