Added basic EAP rendering.

Also fixed a crash when creating the structure of the EAP.