DOC: finish documentation of mattes module and PEP8 corrections