Optimizes, fixes uniquize, adds extend and explode.
merge blah