Added more conditional wrappers for potentially missing elements.

Seems to be effectively generating now.