Created a weights class and moved functions to it from unit_converter.rb