Refactored to use Guard.AgainstInvalidState

Guard.AgainstInvalidState method is now used in replacement of all throw
new InvalidOperationException statements