Added AE compatibility.
Clean up.