Working effectively with Legacy code