Separated calculator logic from view layer; added comments.

* Calculator logic now lives in "calculator" object, which is
  outside the Polymer component.