Refactor plugin align