Widget cleanup

Don't merge this yet - but let's have a pull req anyway.