BODAAC from metadata

I think if you work through this commit-by-commit it will be easier than looking at all the changes together. There are some big changes in here so please let me know if anything is unclear.