[#13] Used .first instead of [0] in some methods, shorter blocks used in map and sort_by