Simplified the template implementation of List and Map.

Simplified the template implementation of List and Map.