Made images.py functional