Fixes for center plugin and code cleanup