House Keeping

Tidying up some code in bash.js, also adding some comments here and
there.
Expect a .min version once input actually works.