Some refactoring

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