Add splay tree and made general tree tests

Fixes #4