Fix whitespace
Extract maybe_add/2
Remove unused variable