relocate svg management in separate js file