Tiddying up of some code