Code cleanup. Added JS extension classes RequestAPI and ResponseAPI.