Filled in plugin functions. Need to test.