Clean up internals