Removed debug warts from implementation functions, so there are fewer distractions when reading the code.