Refactored my code and improved visual appearance

Equivalency rate data pulled from array at the top of the javascript
file, cleaned up and added comments to code, made sub functions more
concise