Minor code tweaks