Some code tidying

Change-Id: Ie2a381cc75a53e6926871f791073e91c27a3dc95