Fix to PEP8, use logging, and add some more documentation
Add labeling feature