documentation, and fixed some things