[tools] Better documentation and PEP8ification

Issues #212 and #125