Refactored BlackBox