changed code according to the latest changes on 'master'
added documentation

Signed-off-by: Thomas Eichstädt-Engelen <thomas@openhab.org>