Code rework

Signed-off-by: Michael 'Tekkla' Zorn <tekkla@tekkla.de>