Removed some extraneous lines of code as per ABray's suggestions