Few small changes to code