REGISTRAR: code optimization

- Unified shared code into private methods.
- Public methods moved above private.
- Updated javadoc.