Add bank_id index to envelopes and refactor Gemfile