Remove unneeded gems and upgrade some others