Pruning old code and reformatting