Added options, JS generator, and various improvements