Cleaned up some imports.
Added assert to debug mysterious bug.