Refactoring and clean up
Merge pull request #694 from systay/2.0-pmd-cleanup

Refactoring and clean up