Remove dead code generating warnings.
 Fix CMake warnings with CMake v3.0
 Add ARRAY_SIZE macro.