small code cleanups