Reorder docs to make more sense, fix code snippet