Merged luke-jr code from eloipool