Minor changes from the past commit. Better rails callback support