Added feature mask. Added ending-to-feature-mask map.