documentation and minor refaxtoring