Purge math, signals subtrees, use external libs