Refactored the getting of registered files