Finish pulling functionality into plugin.