some JSHint advised cleanup