Various amendments, suggestion regarding to xapi-project/sm#221

Feel free to pick any of them, or squash them.