Refactored to work on multiple servers