Fixed spec name
Added spec for variations weight sum, some refactorings