refactor gems (probably breaks imports)