Restructure the app

Update all the gems to support rails4.0.0 final.