Changing file types management code from static to singleton