Implemented AB-pruning; moved a lot of things around