Closes #1, closes #2. javascript added and made accessible