Atomic Deployment fixes, refactoring
Fixed and refactored Atomic Deployment