Changed vertex array to use heap allocation. Also fixed isSolid check.