cleaned up juliet.js

— removed test function

—clarified comments and reformatted to make navigating the document
easier