Added a config handler and cleaned up a bit of reference code.

Will be working on reorganizing the packages later. It doesn't make
sense anymore!