Doing now everythin with maps (using seqTags) rather than arrays. Cleaned up, refactored, using more consistent naming