refactor some more ... try rollbacking / closing ... also separate into pyramid and cp sections