work on plugin settings and code cleanup