Dependencies management

Modified the pattern to manage dependencies easyer.