Moved the ScreenToWorld function to namespace and as a free function