More cleaning up and more work on portals

Portals not working yet though