Revamp into OO style.