Refactored deploy step