Issue #1349574 by mgifford, DamienMcKenna: Wealth of small fixes to match the Drupal coding standards.