Loads of bug fixes and fixes to enable fully automatic enrollment