Fix validation of arguments for register
Rename old register.py to adapter.py

Move to main package directory. Fix imports and setup. And some pep8 fixes.
Forgot to fix some imports after renaming