lots of changes to get plugin up and running