Patola's code merge, small fixes, documentation and jsHint report