Removed unneeded code. Also added change by leechguy.