Refactored vectors and sorted lists as separate modules.