Refactor generic linear collections