Cleaned up internals.