various bug fixes and added planar die to em.html