Device registration

Please review