Improved the list and matrix modules