add a ton of documentation
minor fixes