implementation of port and connection. Before refactorisation of code to only have a top block that can be drawn recursively