Licences all of the Python files (Apache 2.0); starts adding inline documentation.