Added citations.py, modified some other scripts for compatibility