Finishing up PCA, implemented the projection and recovery functions