Separated cwmp and ui code into distinct files to enhance clarity and maintainability with varied internal data representations.