Small optimizations in network module