Move malloc/free inside world initalization