Improve revision JS to best practices

Yikes.