Code cleanup, fixed widget initialisation, documented admin operations