gem and config improvements