Update Rails, improve general performance and clean up code.