Added factory methods to create stack and queue over the sequence struct