replaced buggy binary Nats by working Peano Nats, added function types