Corrects docs

Updates some indentation to be two spaces (more Ruby like).

Also corrects some syntax errors, including missing `end` keywords.