made character_extraction.py more logically organized