Made code more extensible.