Some new features, fixes, cleanups, todos