Updated the code a little.