finished modularizing the components