Unit 3 version: added documentation for all methods.