cherry picked Mani refactor changes
Merge pull request #98 from AdoptOpenJDK/mani_refactoring

cherry picked Mani refactor changes