refactored documentation
refactored registry and argument validation