More work towards 3d stuff