Documentation for all(i hope) the code