some code cleanup getting ready for P2