API, Github markdown version

This update converts most of the HTML in the API docs to Github markdown. I also made some edits mainly for consistency's sake. Please check it, thanks.