Finish main functional.
Merge branch 'rails4-develop' into rails4