Generalized an older implementation I already had, the splay formulas need some improvements. Documentation comes next.