Moved resuable code into a shapeways module