Tweak entity placement code to be cleaner