Refactored ParameterBag, added it's tests.