Added unit tests for subseq. Revised swapElements and attribute functions.