Moved code from XBA to ODT. Boilerplate.