[trunk] Code tidy up