Refactored for Docker