Cleanup of network scanning function
Initial commit