Slight tweaks and code cleanups