Improve performance for 1D sequence handling.
Little refactoring.
Linear algebra protocols implemented and refactored for performance.