Fix test cases and add portscan toy