Refactor objects

I hope I haven't broken anything. Anyone wish to confirm this?
If object_type == ride