Fixed outport bug and added tomography

This is not runnable by anyone else