Improve grants scripts