Some documentation changes and fixes to handle platforms a bit better. Also more tests