Adding JS documentation and script to convert it to MD
Improved makedoc. Improved documentation. Added documentation file.