Fixing up for internal testing, about to merge with trunk again.