More debugging of dpph. Moved script into package.