Initial commit. Ported from PowerPool