refactored package hierarchy ninja style