Fixes bug in reader
Added Javascript API documentation