Adding automatic typesetting.
Tidying up. This is 1.0.