change function prototype
change from unsignend long to int
fix debug build
fix warnings
separate nets with common source

sort nets
fix io slot bugs
better output