Work on a consistent js library.
Added module documentation.