Extracts AMD modules, their parts and an optimized output without unused dependencies.