Added comments and specifications to all modules, their methods and pattern matches.