Refactored to flatten package space