add locallib
using html writer
using the enrolment API
replaced old missing record handling