Upgrade to Rails 4.1

Related to #166 and #197.
Ugly, sorting array. Consider sorting in DB (probably in another PR)...