Simplified code by returning early in error cases
Put client and registration token creation inside a transaction
Layout consistency
Simplified nested conditions
Alignment
Merge pull request #34 from ebu/simplify_registration

Simplify registration