WIP: a complete rewrite

On the way towards symbolic functions.
Fixing some tests, start working on infinities