Move current_instance and current_class into utility module, and use them that way