updated routes as match is deprecated
updated controllers with new rails4 AR stuff