updates for rails4
some clean up