Debugged loadh and saveh issues related to data stacking and unstacking, working correctly now.
Still debugging pca.py, next step is to compare results with sklearn's model.