OP-984 Some refactoring to prepare for multi PID bank GUI support.
OP-984 More refactorng.