Created, after much exasperation, a more concise histogram algorithm, using the .get method.