From a strictly design pattern perspective, you may want to take a look at OSGi (this is highly Java oriented, but is considered to be a very, very good plugin/module system). Might be overkill for what you are trying to achieve, but there is a lot of really good stuff in there about how to handle loading and unloading modules dynamically in the middle of a run, etc...