cut down on functions within pickling.py. Changed where needed within the app files