Updated to new plugin attach pattern.