Removed some test statements within the logical code