Major Code Refactor

Code in "Accessor.js" has been refactored to include shorter and
precise code and also include comments to it.

A small comment added to "Generator.js" too