Remove strange reordering of scope argument (my bad)
Remove deprecated `to_ast` function