Fixed all the warnings/errors because of rst syntax violation

* There were some indentation issues.
* Blank lines were required above and below code blocks.
* Some headings had problems