Did some commenting and documentation