Upgrade rails; rewrite client side code