documentation changes and a bit of code moving