Removed unneeded code, and improved readability.