Cleanup for achievement grant function.