Added more thorough documentation