Refactor for libshader's new handle model