bugfixes, now a splay tree
headOption and lastOption
all tests are passed