Moved all code into starprocessor.py