Documented the usage of optional and mandatory custom hooks and did a minor clean up