Removed all connections_in/connections_out code.
Also fixed some unit tests that were failing.