refactoring: introduce PseudoList to handle non concrete lists

* should make adding a history list entry easier
* includes some non null annotations
* moved list code into separate package