Made some small changes to the code.