Simplify code

Change-Id: I1576c3b8d370fdae660a399654b77af11a5f5d36
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>