Remove some superfluous intermediate object creations