Feth/1.7/refactor sage for tonthon

I had trouble with git add -i, so I pushed it at once...