Begin reorganizing shadow.py functions.