Add proper spacing
Merge duplicate code
Reduce indent level
Merge duplicate code
Merge duplicate code
Set array value always
Merge duplicate code
Remove unreachable code
Reduce indent level