Modifying an app to use active record