refactoring register module

Signed-off-by: RedChrome <redchrome@gmx.de>