Rewrote local decation based on config files instead