How to Manage Technical Debt in Legacy Software Systems