Fix syntax errors and resolve rstcheck.