Clean up portal.ts