Some code tidying

Change-Id: Ibad2033fd246f09d9a56666c813d83c7b36c5cf2