Make a few code tweaks