Some structure pulling utility code