fixed STAR version tracking and cleaned up code.