Removing irrelevant code, adding some portal container stuff