Revert "Minor cleanup of code"

This reverts commit 4d466e499fd00879fdf6765466911a1227e07d13.
Revert "Revert "Minor cleanup of code""

This reverts commit 00f1ed1b5de7cb785d86571c4a2be772049991f3.