Build improvements for modularization