Implement module definitions merging