Fixed NetID generation and removed redundant function