some cleanups to the gem completion script