update: some refactorings.

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>