Restructure and port scanner