Make plugin more generic for more people to us, cleanup