Improve JS environment setup