clean up hasElements boolean

But if you like the more verbose style then keep it.