Refactored javascript code so it will be easy to maintain in sync with the documentation.
Merge pull request #18 from rodrigopavezi/chore/refactoring

Refactored javascript code so it will be easy to maintain in sync with t...