Begin refactoring circuit analysis code into common headers