add docstrings
move content to cat.js
Merge pull request #21 from pmitros/js-clean-up

Js clean up