linux-lily: lilac.py: split functions