restructuring according design pattern and not language