Got rid of unneeded functions in loop.py