Moved some stuff around

And prepared for pwd trim...