Structure definition routines, unit-tests