Updated for compile errors and removed redundant GetInstance function