fix bugs of wire connecting to parent's ports
fix transer function modeling.

now, depth is treated properly, and internal connections
are resolved.

still, thoroughful testing is to be written.
fix json unserialization of `System.params` attribute