Fixes most of issue #2 and update for major MPS refactor.