Fixes #126 : Remove duplicated code in array assertions
get rid of unecessary curly braces and format code