With this, the portal code can be tested separately, including the freeing of the portal information.