Re-organize ast nodes