Modified tagger.py. Organized main() and __name__ == __main__ code into functions to make it more readable.