Improve docs and fix rails 3 error