Encapsulate list behaviour in the list class

Fixes #4
Merge pull request #8 from rowan-m/develop

Encapsulate list behaviour in the list class