Refactor requires, implement RJDocument class