Edited ZDist zlayer to use new API.