Make host, port, device, etc configurable. Clean up the operation with ARC, etc.
Use EXTScope.