Code refactoring - structural improvement (more generic code)