Fix indentation function and commands; rewrite many comments.