Update toplevel - now reads and rewrite terms!! (also multiple corrections and rule table fetching function added)