Refactor vector to list