Add exception and tests and getWeights
Seems to work at 80%
Pre remove MS()
Removed MS()
Improvement const correctness