Refatoring code...