Small code structure tweaks for readibility