Restructured, reimplemented List as a struct with defined type, and implemented full test against spec example.