Refactored svg file loading