Updated compile and queue code