Some math and voxelization fixes