Additional code improvements based on review.
Additional code improvements based on review.

shehzan10/arrayfire,ghisvail/arrayfire,marbre/arrayfire,ghisvail/arrayfire,ghisvail/arrayfire,9prady9/arrayfire,marbre/arrayfire,marbre/arrayfire,arrayfire/arrayfire,9prady9/arrayfire,umar456/arrayfire,9prady9/arrayfire,merlin-ext/arrayfire,munnybearz/arrayfire,umar456/arrayfire,9prady9/arrayfire,shehzan10/arrayfire,arrayfire/arrayfire,umar456/arrayfire,shehzan10/arrayfire,victorv/arrayfire,victorv/arrayfire,merlin-ext/arrayfire,victorv/arrayfire,arrayfire/arrayfire,ghisvail/arrayfire,shehzan10/arrayfire,umar456/arrayfire,munnybearz/arrayfire,merlin-ext/arrayfire,merlin-ext/arrayfire,marbre/arrayfire,arrayfire/arrayfire,victorv/arrayfire,munnybearz/arrayfire