Reorganize non-core decoration code into a separate module.