Move loopless.py into core