Twig asset extension refactored