minor improvements and fixes #6

Signed-off-by: Werner Macho <werner.macho@gmail.com>