Refatoring Code