some cosmetic changes useful for debugging. Added comments for PCA state