Promise Implementation - Refactored