Cleanup duplicate code
Added more specific gem versions