Cleaning up a code smell