Option for disable registration
Some code improvement