More util and cleanups