Javascript API Refactor document improvements