Rewrite StackScraper to be more modular and support dynamic instantiation.