Simplified layer construction in packet.py