[REF] Convert previously shared function to non-static, remove unrelated code