Minor cleanup (rearrange some stuff in ast module more sensibly).