move all PB code to own Storage header