Move most pstat functionality to pretty module