Reportstate 11

Provisionally fixes #11
Opening PR with the expectation that there is probably a bit more stuff to do, but some comments would be appreciated.
`Application.ports` is always supposed to be ` set`, so you don't need the if statement, the for loop can also handle the empty case.