Minor dodgy code cleanups