Refactor: Relocated various functions from r_world.h to better homes