Added license information

Signed-off-by: Dominik Schadow <dominikschadow@googlemail.com>
Refactoring, cleanup

Signed-off-by: Dominik Schadow <dominikschadow@googlemail.com>
Fixed typos

Signed-off-by: Dominik Schadow <dominikschadow@googlemail.com>