Fixed erroneous Sequence constructor.
Added unit tests.