Liskov Substitution Principle and legacy code