docs(JP): docs, assertions, refactor