Misc ruby style fixes
Reduced code smell in builder.rb
Reduced code smell in factory.rb
Rename credentials param for readability